import { createStore } from 'vuex'

export default createStore({
  state: {
    num:1111,
  },
  getters: {
    newNum(state){
      return  state.num * 100
    }
  },
  mutations: {
    addConut(state){
      state.num++
    }
  },
  actions: {
    asyncAddcount(context){
      console.log(123)
      setTimeout(()=>{
        context.commit('addConut')
      },2)
    }
  },
  modules: {
  }
})
